# 获取处理器架构
architecture=$(uname -m)

# 检查是否是 x86 架构
if [[ "$architecture" == "x86"* ]]; then
  # 拉取镜像和部署
	docker run \
    --name study_xxqg \
    -d \
    -p 1234:8080 \
    -v /etc/study_xxqg/:/opt/config/ \
    registry.cn-hangzhou.aliyuncs.com/wxyhgk/xxgq:1.0
  # 设置自动重启
    docker update --restart=always study_xxqg

# 检查是否是 arm 架构
elif [[ "$architecture" == "arm"* ]]; then
  # 拉取镜像和部署
  docker run \
    --name study_xxqg \
    -d \
    -p 1234:8080 \
    -v /etc/study_xxqg/:/opt/config/ \
    pull registry.cn-hangzhou.aliyuncs.com/wxyhgk/xxqg_arm:1.0
    docker update --restart=always study_xxqg
fi